


clear classes

Exp = ET_PTB_SIMPLE();
Exp.scn.res = 3;
Exp.scn.w = 1600;
Exp.scn.h = 1200;

Exp.stimuli = inline(vectorize('cos(x) + 0.04*cos(x*8+(pi/2)) + 0.04*cos(x*16+(pi/2)) + 0.04*cos(x*32+(pi/2))'),'x');
%Exp.stimuli = inline(vectorize('cos(x) - 0.04 * cos(x*8+(pi/2)) + 0.01 * cos(x*16+(pi/2)) - 0.008 * cos(x*32+(pi/2))'),'x');


try
    Exp.stimuli(.75);
    Exp.stimuli([.75,.75]);
catch err
    fprintf(1,'Error evaluating stimuli function');
    rethrow(err)
end
    


% Speeds
speed0 = 270;
speed1 = 300;
% The funcion is 
f = inline('-(a*b)/(b-2*a)','a','b');

speed2 = f(speed0,speed1);
speed3 = f(speed1,speed2);

Exp.FpClearn = [speed0,speed1,speed2,speed3];
Exp.pauses = 8;
Exp.num_trials = 8;
Exp.num_blocks = 4;
self.stim.size = 25;

% Changes the amplitude of the movement from 0.9 Screens to 0.8 screens

Exp.prepareTrialTypes()
Exp.prepareFixation()

ow = (Exp.scn.w/2) * abs(Exp.randomFixation(1)) * 0.5;
op = (Exp.scn.w/2) * abs(Exp.randomFixation(1)) * 0.25;
%Exp.prepareOccluder();
Exp.prepareOccluder(ow,op);
Exp.prepareSpeeds()
Exp.prepareJump()
Exp.prepareFixation()
%Exp.occluder.rgb = [255,255,255];
Exp.Eyelink = 1;
try
    Exp.runScreen()
catch
    % Sanity check
    if self.Eyelink; Eyelink('Shutdown'); end
    Screen('CloseAll');
end

